package Qimo;

import java.util.Scanner;

public class YiChangText {
    static Scanner sc=new Scanner(System.in);
    public static void main(String[] args) {
        try{
            asdf();
        }catch (YiChang e){
            e.printStackTrace();
        }finally {
            System.out.println("程序已结束！");
        }
    }
    public static void asdf(){
        System.out.println("请输入一个字符串：");
        String str=sc.next();
        if (str.length()>6){
            throw new YiChang("字符串长度不能超过6！");
        }else{
            System.out.println(str);
        }
    }
}
